package ar.edu.uade.fain.ad.test.server.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

@Entity
@Table(name = "INTEGRANTE")
@Inheritance(strategy = InheritanceType.JOINED)
public class Integrante extends PersistentObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static enum Sexo {

		MASC, FEME;

	}

	@Column(name = "nombre", length = 30)
	private String nombre;

	@Column(name = "sexo", length = 4)
	@Enumerated(EnumType.STRING)
	private Sexo sexo;

	public Integrante() {
		super();
	}

	public String getNombre() {
		return nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	public Sexo getSexo() {
		return sexo;
	}

	public void setSexo(Sexo sexo) {
		this.sexo = sexo;
	}

	@Override
	public String toString() {
		return "Integrante [nombre=" + nombre + ", sexo=" + sexo + "]";
	}

}
